#!/usr/bin/perl
#use utf8;

sub defsub {
	my $zaehl = shift;
	$rs = sub {
		for ($i=1; $i<=$zaehl; $i++) {
			print "Zaehle bis $zaehl: $i\n";
		}
	};
	return $rs;
}

$rs2 = defsub(2);
$rs4 = defsub(4);

&$rs2;
&$rs4;
